<template>
    <el-card>
        <CategorySelector></CategorySelector>
        <el-card style="margin-top:20px">
            <SpuList v-if="showStatus === ShowStatus.SPU_LIST"></SpuList>
            <SpuForm v-if="showStatus === ShowStatus.ADD_SPU"></SpuForm>
            <SkuForm v-if="showStatus === ShowStatus.ADD_SKU"></SkuForm>
        </el-card>
    </el-card>
</template>

<script>
import CategorySelector from '@/components/CategorySelector/index.vue'
import SpuList from './components/SpuList.vue';
import SpuForm from './components/SpuForm.vue';
import SkuForm from './components/SkuForm.vue';
export default {
    name: 'Spu',
    components: { CategorySelector, SpuList, SpuForm, SkuForm },
    data() {
        return {
            showStatus: 'ADD_SPU',
            ShowStatus: {
                SPU_LIST: 'SPU_LIST',
                ADD_SPU: 'ADD_SPU',
                ADD_SKU: 'ADD_SKU'
            }
        }
    },
    methods: {

    }
}
</script>

<style></style>